Skip to content

Conversation

@kio-watanabe
Copy link
Contributor

Currently, if the directories specified by the -j (-java-source-dir) and -o (-class-file-dir=) options do not exist, it leads to the following behavior.

# cobj op_sample.cbl -j ./Java
Segmentation fault (core dumped)
# cobj op_sample.cbl -o ./Class
Segmentation fault (core dumped)

1. Directory not found

This commit fixes this by outputting a clear error message as shown below.

# cobj op_sample.cbl -j ./Java
Error: './Java' is not a valid directory
# cobj op_sample.cbl -o ./Class
Error: './Class' is not a valid directory

2. Missing argument

If no directory is specified for the -java-source-dir or -class-file-dir options (i.e., the argument is empty), the following error message is output.

# cobj op_sample.cbl -java-source-dir=
Error - Missing directory path argument
# cobj op_sample.cbl -class-file-dir=
Error - Missing directory path argument

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yutaro-sakamoto yutaro-sakamoto merged commit 4d541b3 into opensourcecobol:develop Nov 30, 2025
157 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants